package com.qf.product.controller;

import com.qf.core.dto.PageDto;
import com.qf.core.vo.PageResult;
import com.qf.core.vo.R;
import com.qf.product.entity.Tenant;
import com.qf.product.service.TenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.parameters.P;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 租户表 前端控制器
 * </p>
 *
 * @author yxh
 * @since 2023-10-26
 */
@RestController
@CrossOrigin
@RequestMapping("/tenant")
public class TenantController {


    @Autowired
    private TenantService tenantService;

    @PostMapping("page")
    public PageResult<Tenant> page(@RequestBody PageDto<Tenant> pageDto) {

        return tenantService.page(pageDto);
    }

    @PostMapping("update")
    public R update(@RequestBody Tenant tenant){
        return tenantService.updateTen(tenant);
    }




}
